﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEditor.SceneManagement;
using SerializeEx;



public static class SerializeScriptMenuTool
{
	static string backupDir = "backupDir";

	[MenuItem("Custom/SerializeScriptMenuTool/CustomSerializeScript")]
	static void CustomSerializeScript()
	{
		SerializableFieldContainerHelper.serializeListener = new MySerializeListener();
		
		SerializeScriptTool.SerializeScript(backupDir);
	}
	
	[MenuItem("Custom/SerializeScriptMenuTool/Restore")]
	static void Restore()
	{
		SerializeScriptTool.Restore(backupDir);

		AssetDatabase.Refresh();
	}

	[MenuItem("Custom/SerializeScriptMenuTool/DeleteBackupDir")]
	static void DeleteBackupDir()
	{
		System.IO.Directory.Delete(backupDir, true);
	}

}